package com.cy.store.entity;

import java.io.Serializable;
import java.util.Objects;

public class Favor extends BaseEntity implements Serializable {
    private Integer fid;
    private Integer uid;
    private Integer pid;
    private Long price;
    private String title;
    private String image;

    public Integer getFid() {
        return fid;
    }

    public void setFid(Integer fid) {
        this.fid = fid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Favor)) return false;
        Favor Favor = (Favor) o;
        return getFid().equals(Favor.getFid()) && getUid().equals(Favor.getUid()) && getPid().equals(Favor.getPid()) && getPrice().equals(Favor.getPrice()) && getTitle().equals(Favor.getTitle()) && getImage().equals(Favor.getImage());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getFid(), getUid(), getPid(), getPrice(), getTitle(), getImage());
    }

    @Override
    public String toString() {
        return "favorites{" +
                "fid=" + fid +
                ", uid=" + uid +
                ", pid=" + pid +
                ", price=" + price +
                ", title='" + title + '\'' +
                ", image='" + image + '\'' +
                '}';
    }
}
